const state = {
  sidebarCollapsed: false,
  theme: 'light'
}

const mutations = {
  TOGGLE_SIDEBAR: (state) => {
    state.sidebarCollapsed = !state.sidebarCollapsed
  },
  SET_THEME: (state, theme) => {
    state.theme = theme
  }
}

const actions = {
  toggleSideBar({ commit }) {
    commit('TOGGLE_SIDEBAR')
  },
  setTheme({ commit }, theme) {
    commit('SET_THEME', theme)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
} 